ul.breadcrumb.mtop30
	li
		a(href='/portal/index') 首页
	li.sep >
	li 理财产品

.moneyAd
	.gf-ad(datasource='ad/list?code=asset')

table.mtop25.mcbg(gf-click="products=[];reload()", gf-active-class='typebg_active')
	tr
		td.tac.mticon.wc.font24(rowspan=3) 分类
		td.padleft30.mtupper.tal
			a.ib.tac.font14.typebg.typebg_active(href='javascript:void(0);', data-click="products=[];param={pageNum:1, all: 1};").mright20 全部
			a.ib.tac.font14.typebg(href='javascript:void(0);', data-click="products=[];param={risk_level:'1,2', pageNum:1};").mright20 保守型
			a.ib.tac.font14.typebg(href='javascript:void(0);', data-click="products=[];param={risk_level:3, pageNum:1};").mright20 稳健型
			a.ib.tac.font14.typebg(href='javascript:void(0);', data-click="products=[];param={risk_level:'4,5', pageNum:1};").mright20 积极型
			a.ib.tac.font14.shouYiBaoBg(href='javascript:void(0);', data-click="products=[];param={q : '/理财产品/收益凭证', pageNum:1};").mright20 收益宝
			a.ib.tac.font14.newtypebg(href='#/asset/recommend', target='_blank') 现金理财产品推荐
		td.mtright(rowspan=3)
			.typewrap.actvType(data-class='actvType', data-click='param.pageNum=1;type=1')
				a.ib.tupian.vat(href='javascript:void(0);', title='按图形方式显示')
				.actvCaret
		td.mtright(rowspan=3)
			.typewrap(data-class='actvType', data-click='param.pageNum=1;type=0;')
				a.ib.liebiao.vat(href='javascript:void(0);', title='按列表方式显示')
				.actvCaret
	tr
		td.mtlower.btopdashed.padleft30.tal
			a.ib.tac.font14.typebg(href='javascript:void(0);', data-click="products=[];param={q : '/理财产品/'+types[1], pageNum:1};").mright20 混合型
			a.ib.tac.font14.typebg(href='javascript:void(0);', data-click="products=[];param={q : '/理财产品/'+types[2], pageNum:1};").mright20 FOF
			a.ib.tac.font14.typebg(href='javascript:void(0);', data-click="products=[];param={q : '/理财产品/'+types[3], pageNum:1};").mright20 债券型
			a.ib.tac.font14.typebg(href='javascript:void(0);', data-click="products=[];param={q : '/理财产品/'+types[4], pageNum:1};").mright20 货币型
			a.ib.tac.font14.typebg(href='javascript:void(0);', data-click="products=[];param={q : '/理财产品/'+types[5], pageNum:1};").mright20 量化产品
			a.ib.tac.font14.typebg(href='javascript:void(0);', data-click="products=[];param={q : '/理财产品/'+types[6], pageNum:1};") QDII
	tr
		td.mtlower.btopdashed.padleft30.tal
			a.ib.tac.font14.typebg.longer(href='javascript:void(0);', data-click="products=[];param={'sale_method': 'd', pageNum:1};").mright20 银行卡支付
			a.ib.tac.font14.typebg.longer(href='javascript:void(0);', data-click="products=[];param={'sale_method' : 'e', pageNum:1};") 保证金支付

.mtop30(ng-switch='type')
	section(ng-switch-when=1, gf-scroll="getData();", gf-scroll-distance='1', gf-scroll-disabled='!param.pageNum', gf-scroll-immediate-check='false')
		.ib.m_col_1_4.mbottom20.iuxMPro(ng-repeat='pro in products', ng-class='{first: 0 == $index % 4}')
			.pane(ng-init='_change=pro.extra2.latest_netval[0].product_net_value;_change_rate=pro.extra2.latest_netval[0].cumulate_net_value').ng-cloak
				figure
					a(gf-href='#/asset/detail?pid={{pro.id}}', ng-show="pro.isShow").yunig
						img(ng-src='/_image/pdt_asset_{{pro.id}}_index', alt='{{pro.title}}').mon_p

					a(ng-hide='pro.isShow', gf-href="#/asset/detail?pid={{pro.id}}").yunig.action-guard
						img(ng-src='/_image/pdt_asset_{{pro.id}}_index', alt='{{pro.title}}').mon_p
					figcaption
						.mon_cap
							a(gf-href='#/asset/detail?pid={{pro.id}}').link {{pro.title}}

						.descp.descpsalem
							.pexsalemethod(ng-show="pro.extra2.sale_method == 'e'")
								em.imtxt 结算方式：
								em.icn_earnest(title='保证金支付')
							.pexsalemethod(ng-show="pro.extra2.sale_method == 'd'")
								em.imtxt 结算方式：
								em.icn_card_pay(title='银行卡支付')
							.pexsalemethod.edsMethod(ng-show="pro.extra2.sale_method == 'ed' || pro.extra2.sale_method == 'de'")
								em.imtxt 结算方式：
								em.icn_earnest(title='保证金支付')
								em.icn_card_pay(title='银行卡支付')
								em.icn_direct_pay(title='淘金宝支付',style="display:none")
						.descp.padleft15.padright15(style="display:none")
							a(gf-href='#/asset/detail?pid={{pro.id}}')
								{{pro.extra2.rcmdreason.substring(0, 47)}}
								span(ng-show='pro.extra2.rcmdreason.length > 46')...

						.purchaseDiv.clearfix

							div(ng-show="!(pro.extra2.money_type=='derive_bc' && pro.extra2.derive_type)")
								.pull-right.font12.nfc.b(ng-switch='!pro.extra2.yjbjjz')
									span(ng-switch-when='true', ng-switch='pro.code',class='proxcode')
										span.ngw873(ng-switch-when=873001, ng-show='!!_change_rate')
											em.yunhy 预期年化收益
											span.fgroup
												span.row1(ng-show='_change_rate>0', ng-class='{rc: _change_rate>0}') +
												span.row2.row2more(ng-class='{grc: _change_rate<0, rc: _change_rate>0}') {{_change_rate | percentage : 2}}
										span.ngw878(ng-switch-when=878001)
											em.yunhy 3X沪深300或创业板指
										span.ngwdef(ng-switch-default, ng-init='_value = shouyi(pro)', ng-show='_value')
											em.yunhy 今年收益 
											span.fgroup
												span.row1(ng-show='_value>0', ng-class='{rc: _value>0}') +
												span.row2(ng-class='{grc: _value<0, rc: _value>0}') {{_value | percentage : 2}}


									span(ng-switch-when='false')
										em.yunhy 预期年化收益
										span.fgroup
											span.row1(ng-show='pro.extra2.yjbjjz>0', ng-class='{rc: pro.extra2.yjbjjz>0}') +
											span.row2(ng-class='{grc: pro.extra2.yjbjjz<0, rc: pro.extra2.yjbjjz>0}') {{pro.extra2.yjbjjz | percentage : 2}}
							.pull-right.font12.nfc.b(ng-show="pro.extra2.money_type=='derive_bc' && pro.extra2.derive_type")
								span
									em.yunhy 预期年化收益
									span.fgroup
										span.row2.row2more(ng-class='{smallFont : pro.extra2.yqsyl_desc.length > 10}') {{pro.extra2.yqsyl_desc}}

							.ib(ng-switch="pro.extra2.is_purchase_status")
								.ib(ng-switch="!pro.extra2.buy_at_other_site", ng-switch-when='true')
									a.buy.wc(ng-switch-when='true', ng-click="dialog.MoneyTip=true;buy(pro)", href='javascript:void(0)') 购买
									a.buy.wc(ng-switch-when='false', gf-href='{{pro.extra2.buy_at_other_site}}', target="_blank") 购买
								span.buy-disabled.wc(ng-switch-when='false') 购买

				.mask.m_col_1_4.first(ng-hide='pro.isShow || pro.shouldTipOpen')
					.msg 相关信息广发客户登录后可见
					a.login_btn(href='#/account', ng-show='pro.extra2.sale_method.indexOf("d") >= 0') 立即开户
					a.login_btn(href='https://account.gf.com.cn/', target='_blank' , ng-show='pro.extra2.sale_method.indexOf("d") == -1') 立即开户
					a.login_btn(href='javascript:;', ng-click='login(pro.extra2.sale_method)') 登 录
				//- 既不是交易账户又不是理财账户
				.mask.m_col_1_4.first(ng-show='pro.shouldTipOpen')
					.msg 相关信息开户后可见
					a.login_btn(href='#/account', ng-show='pro.extra2.sale_method.indexOf("d") >= 0') 立即开户
					a.login_btn(href='https://account.gf.com.cn/', target='_blank', ng-show='pro.extra2.sale_method.indexOf("d") == -1') 立即开户

		.tac.pad20(ng-show='loading')
			img(src='img/loading.gif')
					
	div(ng-switch-when=0)	
		.asset-table.nfc
			.yui3-g.b.font13.nows.thd.gf-fixtop
				.yui3-u.col1(style='display: none;')
					.blurbright
						span.vam 序号
				.yui3-u.col2
					.blurbright
						span.vam 代码
				.yui3-u.col3(style='width: 136px;')
					.blurbright
						span.vam 简称
				.yui3-u.col4
					.blurbright
						span.vam 产品类型
				.yui3-u.col4(style='width: 80px;')
					.blurbright
						span.vam 风险级别
				.yui3-u.col4(style='width: 96px;')
					.blurbright.cp(ng-click="changeOrder('extra2.latest_netval.product_net_value')")
						span.vam(ng-class="{lbc: sort == 'extra2.latest_netval.product_net_value'}") 单位净值(元)
						.s-icon(ng-class="{sortIcon3: order == 'asc', sortIcon2: order == 'desc'}", ng-show="sort == 'extra2.latest_netval.product_net_value'")
						.s-icon.sortIcon1(ng-hide="sort == 'extra2.latest_netval.product_net_value'")

				.yui3-u.col4(style='width: 96px;')
					.blurbright.cp(ng-click="changeOrder('extra2.latest_netval.cumulate_net_value')")
						span.vam(ng-class="{lbc: sort == 'extra2.latest_netval.cumulate_net_value'}") 累计净值(元)
						.s-icon(ng-class="{sortIcon3: order == 'asc', sortIcon2: order == 'desc'}", ng-show="sort == 'extra2.latest_netval.cumulate_net_value'")
						.s-icon.sortIcon1(ng-hide="sort == 'extra2.latest_netval.cumulate_net_value'")

				.yui3-u.col4(style='width: 80px;')
					.blurbright
						span.vam 产品状态
				.yui3-u.col5
					.blurbright.nomp.font12
						.col5_h_1_2.blurbbottom.nomp 总回报(%)
						.col5_h_1_2.yui3-g.nomp
							.yui3-u-1-3.nomp
								.blurbright.cp(ng-click="changeOrder('extra2.latest_netval.yieldrate3m')")
									span(ng-class="{lbc: sort == 'extra2.latest_netval.yieldrate3m'}")
										span.vam 三个月
									.s-icon.mie6(ng-class="{sortIcon3: order == 'asc', sml3: order == 'asc', sortIcon2: order == 'desc', sml2: order == 'desc'}", ng-show="sort == 'extra2.latest_netval.yieldrate3m'")
									.s-icon.sortIcon1.sml1(ng-hide="sort == 'extra2.latest_netval.yieldrate3m'")

							.yui3-u-1-3.nomp
								.blurbright.cp(ng-click="changeOrder('extra2.latest_netval.yieldrate6m')")
									span(ng-class="{lbc: sort == 'extra2.latest_netval.yieldrate6m'}")
										span.vam 六个月
									.s-icon.mie6(ng-class="{sortIcon3: order == 'asc', sml3: order == 'asc', sortIcon2: order == 'desc', sml2: order == 'desc'}", ng-show="sort == 'extra2.latest_netval.yieldrate6m'")
									.s-icon.sortIcon1.sml1(ng-hide="sort == 'extra2.latest_netval.yieldrate6m'")

							.yui3-u-1-3.nomp
								.cp(ng-click="changeOrder('extra2.latest_netval.yieldratety')")
									span(ng-class="{lbc: sort == 'extra2.latest_netval.yieldratety'}")
										span.vam 一年
									.s-icon.mie6(ng-class="{sortIcon3: order == 'asc', sml3: order == 'asc', sortIcon2: order == 'desc', sml2: order == 'desc'}", ng-show="sort == 'extra2.latest_netval.yieldratety'")
									.s-icon.sortIcon1.sml1(ng-hide="sort == 'extra2.latest_netval.yieldratety'")

				.yui3-u.col5(style='width: 66px;') 
					.blurbright.cp(ng-click="changeOrder('extra2.sale_method')")
						span(ng-class="{lbc: sort == 'extra2.sale_method'}")
							span.vam 结算方式
						.s-icon(ng-class="{sortIcon3: order == 'asc', sortIcon2: order == 'desc'}", ng-show="sort == 'extra2.sale_method'")
						.s-icon.sortIcon1(ng-hide="sort == 'extra2.sale_method'")
				.yui3-u.col6(style='width: 90px;') 操作

			.yui3-g.tbd.blurbtop(ng-repeat='pro in products', ng-init='latest_netval=pro.extra2.latest_netval[0]', ng-class-even="'blurevenbg'", ng-hide="(session.anonymous || !session.user.trade) && pro.extra2.xzxc == 1")
				.yui3-u.col1(style='display: none;')
					.blurbright {{$index+1}}
				.yui3-u.col2
					.blurbright {{pro.code}}
				.yui3-u.col3(style='width: 136px;')
					.blurbright
						a(gf-href='#/asset/detail?pid={{pro.id}}').link {{pro.title}}
				.yui3-u.col4
					.blurbright {{(pro.extra.category | category) || "--"}}
				.yui3-u.col4(style='width: 80px;')
					.blurbright {{fundRiskLevelLabels[pro.risk_level]}}
				.yui3-u.col4(style='width: 96px;')
					.blurbright {{(latest_netval.product_net_value | number : 4) || '--'}}
				.yui3-u.col4(style='width: 96px;')
					.blurbright {{(latest_netval.cumulate_net_value | number : 4) || '--'}}
				.yui3-u.col4(style='width: 80px;')
					.blurbright {{productStatus[(pro.extra2.latest_info && pro.extra2.latest_info.status) || pro.extra2.otc_info.prod_status] || '--'}}
				.yui3-u.col5
					.yui3-g.blurbright
						.yui3-u-1-3
							.blurbright(ng-bind-html-unsafe='compareDate((latest_netval.yieldrate3m | percentage : 2), pro.extra2.contracteffectdate, 90)')
						.yui3-u-1-3
							.blurbright(ng-bind-html-unsafe='compareDate((latest_netval.yieldrate6m | percentage : 2), pro.extra2.contracteffectdate, 180)')
						.yui3-u-1-3(ng-bind-html-unsafe='compareDate((latest_netval.yieldratety | percentage : 2), pro.extra2.contracteffectdate, 365)')
				.yui3-u.col5(style='width: 66px;')
					.blurbright
						.pexsalemethod(ng-show="pro.extra2.sale_method == 'e'")
							em.icn_earnest(title='保证金支付')
						.pexsalemethod(ng-show="pro.extra2.sale_method == 'd'")
							em.icn_card_pay(title='银行卡支付')
						.pexsalemethod.edsMethod(ng-show="pro.extra2.sale_method == 'ed' || pro.extra2.sale_method == 'de'")
							em.icn_earnest(title='保证金支付')
							em.icn_card_pay(title='银行卡支付')
							em.icn_direct_pay(title='淘金宝支付',style='display:none')
				.yui3-u.col6(style='width: 90px;')
					.ib(ng-switch="pro.extra2.is_purchase_status")
						.ib(ng-switch="!pro.extra2.buy_at_other_site", ng-switch-when='true')
							a.buy.wc(ng-switch-when='true', ng-click="dialog.MoneyTip=true;buyNew(pro)", href='javascript:void(0)') 购买
							a.buy.wc(ng-switch-when='false', gf-href='{{pro.extra2.buy_at_other_site}}', target="_blank") 购买
						span.buy-disabled.wc(ng-switch-when='false') 购买
					a.mon-date-icon.mleft10(href='javascript:void(0);', gf-title='cxkfr', title='查询开放日', ng-click='searchOpenday(pro.code)', gf-cxkfr)

			.tac.pad20(ng-show='loading')
				img(src='img/loading.gif')

		include mixin
		mixin paging('page', 'paging')

//开放日查询日历控件
.mtop40.mbottom40.calendar-box.radius8.hidden(ng-controller='App.MoneyOpendayCtrl', ng-init='_y=false;_m=false;', ng-click='_y=false;_m=false;')
	.arrow-wrap
		.arrow
		.blank
		.btip
			.ib.pad5.f08257bg.mright8
			| 橙色表示开放日

	.b.relative.font14.mtop30.mleft30.mright30
		.ib.year-box.vam.cp(ng-click='_y=!_y;_m=false')
			.mleft20 {{year}}

		.ib(ng-switch='_y')
			ul.year-box-list(ng-switch-when='true')
				li(ng-repeat='y in years', index='$index', ng-click='$parent.$parent.year=y;$parent.$parent._y=false;changeDate(y, month)')
					a(href='#', onclick='return false') {{y}}

		span.vam.mleft8 年

		.ib.year-box.month-box.vam.cp(ng-click='_m=!_m;_y=false')
			.mleft20 {{month}}
		
		.year-box-list.month-box-list(ng-show='_m')
			.month-month-box-cell.cp(index='0', ng-click='month=1;_m=false;changeDate(year, month)')
				a(href='#', onclick='return false') 1
			.month-month-box-cell.cp(index='1', ng-click='month=2;_m=false;changeDate(year, month)')
				a(href='#', onclick='return false') 2
			.month-month-box-cell.cp(index='2', ng-click='month=3;_m=false;changeDate(year, month)')
				a(href='#', onclick='return false') 3
			.month-month-box-cell.cp(index='3', ng-click='month=4;_m=false;changeDate(year, month)')
				a(href='#', onclick='return false') 4
			.month-month-box-cell.cp(index='4', ng-click='month=5;_m=false;changeDate(year, month)')
				a(href='#', onclick='return false') 5
			.month-month-box-cell.cp(index='5', ng-click='month=6;_m=false;changeDate(year, month)')
				a(href='#', onclick='return false') 6
			.month-month-box-cell.cp(index='6', ng-click='month=7;_m=false;changeDate(year, month)')
				a(href='#', onclick='return false') 7
			.month-month-box-cell.cp(index='7', ng-click='month=8;_m=false;changeDate(year, month)')
				a(href='#', onclick='return false') 8
			.month-month-box-cell.cp(index='8', ng-click='month=9;_m=false;changeDate(year, month)')
				a(href='#', onclick='return false') 9
			.month-month-box-cell.cp(index='9', ng-click='month=10;_m=false;changeDate(year, month)')
				a(href='#', onclick='return false') 10
			.month-month-box-cell.cp(index='10', ng-click='month=11;_m=false;changeDate(year, month)')
				a(href='#', onclick='return false') 11
			.month-month-box-cell.cp(index='11', ng-click='month=12;_m=false;changeDate(year, month)')
				a(href='#', onclick='return false') 12

		span.vam.mleft8 月

	.mtop25.font13.mleft30
		each w in ['周一', '周二', '周三', '周四', '周五', '周六', '周日']
			.week-1-7 #{w}

	.mtop10.font14.mleft30
		.week-1-7.b(ng-repeat='d in days')
			span(ng-class='{important: d.cls}') {{d.day}}

.dialog.border.g.hidden.riskLevelDialog(fixed=1, gf-dialog='dialog.MoneyTip', gf-remove-class='hidden')
	.close(ng-click='dialog.MoneyTip=false', title='关闭') &nbsp;
	.title.font16 {{product.title}}
	.pad30(ng-switch='online && userFxdj<product.risk_level')
		div(ng-switch-when='true')
			p.rc.b(ng-show='userFxdj != 0')
				| 根据您所填写的我司<<投资者风险能力调查评估与问卷>>, 您的风险属性类型评估结果为{{riskLevelLabels[userFxdj]}}型, 鉴于您所购买的产品风险级别为{{fundRiskLevelLabels[product.risk_level]}}风险型, 高于您的风险承受能力, 请您充分了解自身风险承受能力水平及产品风险属性.
			p.rc.b(ng-show='userFxdj == 0') 您暂未开展风险测评，请开展风险测评后购买产品。
			p
				a(href='javascript:void(0);', ng-click='dialog.MoneyTip=false', ng-show='userFxdj != 0').btn.primary.mtop10 确定
				a(href='/webservice/risk', ng-click='dialog.MoneyTip=false', gf-append-back).btn.primary.mleft20.mtop10 
					span(ng-show='userFxdj == 0') 风险测评
					span(ng-show='userFxdj != 0') 风险再测评

		.asset-dialog-content(ng-switch-when='false')
			.font18.nfc {{product.name}}

			.padtop25.padbottom25
				.sfc
					| 产品代码：{{product.code}}

				.mtop10.sfc
					| 购买金额：
					input.input(type='number', ng-model='$parent.number', min=0, ng-maxlength=20, required, gf-blur='($parent.number <= 0 || !$parent.number) && ($parent.number = product.extra2.csje)').w5em
					| &nbsp;&nbsp;元
		
			.btopdotted 
				.padtop20(ng-show='product.extra2.invest_end_date && product.extra2.tzqx > 0')
					.yqsy.font14.nfc
						| 按此投资金额，预计您将在
						span(ng-bind="product.extra2.invest_end_date | date : 'yyyy-MM-dd'")
						| ，获得
						span.important(ng-bind='calculateYQSY($parent.number, product) | number : 2')
						| 元收益，
						span(ng-show='incomedetail')
							| 这笔收益可以让
							span.important 您{{incomedetail}}
					.yqsy.font12.afc
						|* 上述获利根据预期收益率与拟投资金额估算，不代表实际收入。
				.padtop20
					.yui3-g
						.yui3-u-5-12
							a(href='javascript:void(0);', ng-click='purchaseProductNew(product,product.extra2.sale_method)').btn.primary 立即购买
						.yui3-u-7-12
							b.rc(ng-bind='product.extra2.gmts')	
